home *** CD-ROM | disk | FTP | other *** search
-
- ;*****************************************************************
- ;*
- ;* BlitzPlay History
- ;*
- ;* V0: Initial release
- ;*
- ;*****************************************************************
-
- NoCli ;First up, get rid of that damned CLI
- WBStartup ;Kickstart 2+ ONLY, which really sucks. Does anyone have a 1.3 WBStartUp command?
- Goto begin ;We don't want to run through the version info do we ;)
- Dc.b "$VER: BlitzPlay V0 1997 Toby Zuijdveld"
- Even ;We don't want to accidentally set the code to 020 only now do we ;)
-
- .begin:
- INCLUDE "THX-Offsets.bb"
- INCLUDE "BlitzPlay.bb" ;In with the features
- MaxLen fi$=64 ;The maximum length of the filename$ - I know they're too big but I'm too lazy
- MaxLen pa$=160 ;The maximum length of the pathname$ - to get them as small as possible :)
- FindScreen 0 ;We have to grab a screen from somewhere so we can open the filereq
- DefaultIDCMP $200
- Window 0,0,16,ScreenWidth,ScreenHeight-16,$100f,"",2,1
- WindowOutput 0
-
- .again:
- title$="Select a module to play" ;The loop
- success$=Begin{FileRequest$(title$,pa$,fi$)} ;OK it's not a very pretty filereq but it does the job and it's s
- If success$<>""
- body$=success$
- Gosub doerror
- Goto ende
- EndIf
- tempnumber.b=TimerModes{}
- If tempnumber=4
- body$="TimerTick speeds not supported in this player!" ;AND TimerTick isn't supported by this player ;)
- Gosub doerror
- Goto ende
- EndIf
- If tempnumber>3 Then tempnumber-4
- If tempnumber<>3 ;We expect there's at least one player routine, so we won't both
- choice.b=tempnumber
- Else
- If NTSC
- choice=2
- Else
- choice=1
- EndIf
- EndIf
- success$=InitMusic{} ;Initialise the module
- If success$<>"" ;Did it work?
- body$=success$ ;Nope, then error me purple.
- Gosub doerror
- Goto ende
- EndIf
- numsongs.b=GetNumSongs{}
- tit$="BlitzPlay by Toby Zuijdveld"
- currenttune.l=Rnd(numsongs)+1
- SetSongNum{currenttune}
- success$=StartMusic{}
- If success$<>""
- body$=success$
- Gosub doerror
- Goto ende
- EndIf
- leftnoise.l=$100
- rightnoise.l=$100
- songname$=GetSongName{}
- songauthor$=GetSongAuthor{}
- title$=""
- If songauthor$<>"" Then title$=songname$+" Created by "+songauthor$
- maker$=GetMakerName{}
- If maker$="" Then maker$=CreatorID{}
- If title$<>""
- title$+" with "+maker$
- Else
- title$=songname$+" Created with "+maker$
- EndIf
- WTitle title$,tit$
- scrolltxt$=GetScroll{}
- NPrint ""
- WPrintScroll
- NPrint "This module contains ",numsongs," songs."
- WPrintScroll
- NPrint "We are playing song #",currenttune,"."
- WPrintScroll
- NPrint ""
- WPrintScroll
- Repeat ;Wait for user to get sick of the MOD
- ev.l=Event
- VWait
- If choice=1
- success.b=Vblank50{} ;Actually PLAYS the MOD :)
- Else
- success=Vblank60{}
- EndIf
- If scrolltxt$<>""
- counter.b+1
- If counter=5
- WTitle scrolltxt$,title$
- scrolltxt$=UnRight$(scrolltxt$,1)
- If Len(scrolltxt$)=0 Then scrolltxt$="":WTitle title$,tit$
- counter=0
- EndIf
- EndIf
- Until ev=$200
- For i.l=255 To 0 Step -1
- VWait
- If choice=1
- success.b=Vblank50{} ;Actually PLAYS the MOD :)
- Else
- success=Vblank60{}
- EndIf
- success=SetVolume{i,i}
- Next
- StopMusic{}
- EndMusic{}
- Finish{} ;We better add that in, before I lose all my memory testing this code :)
- Goto again ;That's it, Charlie Brown!
-
- .ende:
- CloseWindow 0
- Free Screen 0
- End
-
- .doerror: ;My really groovey error handler...
- NPrint ""
- WPrintScroll
- NPrint body$
- WPrintScroll
- NPrint ""
- WPrintScroll
- NPrint "Hit mousebutton to continue."
- WPrintScroll
- MouseWait
- Return ;And that's it :)
-
-